package game.actor
{
	import away3d.containers.*;
	import engine.asset.*;
	import engine.core.*;
	import engine.graphics.away3d.*;
	import engine.graphics.vfx.*;
	import engine.loaders.*;
	import engine.math.*;
	import flash.display.*;
	import flash.text.*;
	import game.*;
	import game.core.*;
	import game.graphics.shader.*;
	import game.messages.gamedata.*;
	import game.messages.inventory.*;
	import game.messages.simulation.*;
	import game.messages.store.*;
	//import game.messages.viewer.*;
	import game.network.*;
	import game.scene.*;
	import game.ui.core.*;
	
	public class RxHero extends RxActorState
	{
		protected var m_createNewPath:int;
		private var m_debugSpot:Sprite;
		private var m_debugNode:TextField;
		protected var m_targetActor:RxActor;
		private var m_debugAnim:String;
		private var m_debugVFX:String;
		protected var m_playerIndex:int;
		private var m_sentStateRequest:Boolean;
		private var m_playerName:String;
		protected var m_abilities:RxAbilities;
		protected var m_stat:Object;
		private var m_gold:uint = 0;
		private var m_platinum:uint = 0;
		private var m_keys:uint = 0;
		protected var m_usedItemSequence:RxSequence = null;
		protected var m_immunityMsg:RxSimulation_PlayerImmunityTimerMessage = null;
		private var m_immunityVFX:RxWorldFXChain;
		protected var m_xrayColor:RxVector4;
		public static const s_availableWeapons:Vector.<String> = new Vector.<String>(["sword_of_life", "mace", "axe_01", "sword_of_death"]);
		
		public function RxHero(param1:int, param2:String)
		{
			super(param1, RxEntityType.ENTITY_TYPE_HERO, param2);
		}
		
		public static function FindPlayer() : RxHero
		{
			var _loc_1:* = RxSimulation.GetPlayerIndex();
			return FindPlayerByIndex(_loc_1);
		}
		
		public static function FindPlayerByIndex(param1:int) : RxHero
		{
			var _loc_3:RxHero = null;
			var _loc_2:* = RxEntity.FindByType(RxEntityType.ENTITY_TYPE_HERO);
			for each (_loc_3 in _loc_2)
			{
				
				if (_loc_3.m_playerIndex == param1)
				{
					return _loc_3;
				}
			}
			return null;
		}
		
		override public function IsConfigured() : Boolean
		{
			if (RxSimulation.IsLoggingIn())
			{
				return false;
			}
			
			//this.SendStateRequest();
			
			return super.IsConfigured();
		}
	}
}